import java.util.*;
public class LLTest
{
  static DoublyLinkedList12 list = new DoublyLinkedList12();

  public static void main (String [] args)
  {
    System.out.print("List length: " + list.size() + "\n");
    list.add("This");
    list.add("is");
    list.add("a");
    list.add("list!");
    System.out.print("New List length: " + list.size() + "\n");

    for (Object iter : list)
    {
      System.out.print(((String)iter) + " ");
    }

    Iterator theIter = list.iterator();

    while (theIter.hasNext())
    {
      if (((String)theIter.next()).equals("is"))
      {
        theIter.remove();
      }
    }
    for (Object iter : list)
    {
      System.out.print(((String)iter) + " ");
    } 
    System.out.print("\n");
  }
}
